<div class="abiturients index">
<h2><?php __('Список абитуриентов для оформления');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Страница %page% из %pages%, показано %current% записей из %count% всего, начиная с %start%, заканчивая %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0" class="art-article">
<tr>
	<th><?php echo $paginator->sort('№ дела','id');?></th>
	<th><?php echo $paginator->sort('ФИО','lastname');?></th>
	<th><?php echo $paginator->sort('Д.Р.','birthdate');?></th>
	<th><?php echo $paginator->sort('Пол','gender_id');?></th>
	<th><?php echo $paginator->sort('Серия','passport_ser');?></th>
	<th><?php echo $paginator->sort('Номер','passport_num');?></th>
	<th class="actions"><?php __('Действия');?></th>
</tr>
<?php
$i = 0;
foreach ($abiturients as $abiturient):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $abiturient['Abiturient']['id']; ?>
		</td>
		<td>
			<?php echo $abiturient['Abiturient']['lastname']; ?>  
			<?php echo $abiturient['Abiturient']['firstname']; ?> 
			<?php echo $abiturient['Abiturient']['surname']; ?>
		</td>
		<td>
			<?php echo $abiturient['Abiturient']['birthdate']; ?>
		</td>		
		<td>
			<?php echo $abiturient['Gender']['name']; ?>
		</td>
		<td>
			<?php echo $abiturient['Abiturient']['passport_ser']; ?>
		</td>
		<td>
			<?php echo $abiturient['Abiturient']['passport_num']; ?>
		</td>
		<td class="actions">
			<?php echo $html->link(__('Оформить', true), array('action' => 'prepare', $abiturient['Abiturient']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<br />
<div class="paging">
	<?php echo $paginator->prev('<< '.__('назад', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('вперед', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<fieldset>
 		<legend> <b>Поиск</b>
 		</legend>
 		
<?php echo $form->create(false, array('action' =>'simplesearch'));	?>
<table width="80%" cellspacing="1" cellpadding="1">
  <tr>
    <td width="25%">Фамилия &nbsp; </td>
    <td colspan="3"><?php echo $form->input('lastname', array('label' => '', 'size' => 50));?></td>
  </tr>
  <tr>
    <td width="25%">Паспорт серия</td>
    <td width="25%"><?php echo $form->input('passport_ser', array('label' => ''));?></td>
    <td width="25%">Паспорт номер</td>
    <td width="25%"><?php echo $form->input('passport_num', array('label' => ''));?></td>
  </tr>
  <tr>
    <td width="25%">№ дела &nbsp;</td>
    <td width="25%"><?php echo $form->input('abiturient_id', array('label' => ''));?></td>
    <td width="25%">&nbsp;</td>
    <td width="25%">&nbsp;</td>
  </tr>
  <tr>
    <td width="25%">&nbsp;</td>
    <td width="25%">&nbsp;</td>
    <td width="25%"><?php echo $form->end('Искать'); ?></td>
    <td width="25%">&nbsp;</td>
  </tr>
</table>
	

</fieldset>

